<div class="clearfix mt-5">
    <h3 class="mb-4">评论</h3>
    {%if not ctx.userInfo%}
    <div class="alert alert-primary" role="alert">
        你还没有登录，请先 <a href="#" data-href="/mc/login" data-ajax-modal-container="#mc_login" data-ajax-modal-size=""
            data-ajax-modal-centered="true" data-ajax-modal-callback-function=""
            class="alert-link js-ajax-modal">登录/注册</a> ！
    </div>
    {%else%}
    <!-- already logged in -->
    <span class="d-block text-muted small mb-1">
    登录用户: <b>{{ctx.userInfo.username}}</b>. 
    不是你吗? 请 <a rel="nofollow" href="/mc/logout?url={{ctx.url}}">退出登录!</a>
  </span>

    <!-- Write Comment Form -->
    <form novalidate method="post" action="/cms/comments/add"
        class="js-ajax bs-validate d-block bg-white shadow-primary-xs rounded p-3 mb-5" data-ajax-update-url="false"
        data-ajax-show-loading-icon="true"
        data-error-toast-text="<i class='fi fi-circle-spin fi-spin float-start'></i> 请填写所有必填字段！"
        data-error-toast-delay="3000" data-error-toast-position="top-center" data-error-scroll-up="true"
        data-ajax-callback-function="cms_comments_callback">
        <div class="clearfix mb-3">

            <div class="form-floating">
                <textarea class="medium-editor bg-white border p-3 rounded w-100" required style="min-height:120px" id="comment_description" name="content"
        data-placeholder="请输入内容..."
        data-lng-save="保存"
        data-lng-clear="清空"
        data-lng-link="请输入链接地址"
        data-btn-picker="true"
        data-btn-bold="true"
        data-btn-italic="true"
        data-btn-underline="true"
        data-btn-link="true"
        data-btn-h1="false"
        data-btn-h2="false"
        data-btn-h3="false"
        data-btn-h4="true"
        data-btn-h5="true"
        data-btn-h6="true"
        data-btn-unordered="true"
        data-btn-ordered="true"
        ></textarea>
            </div>
        </div>
        <input type="hidden" name="doc_id" value="{{detail.id}}">
        <button type="submit" class="btn btn-primary btn-sm">
      提交评论
    </button>
    </form>
    <!-- /Write Comment Form -->
    {%endif%}
    <!-- LIST COMMENTS -->

    <!-- ajax container - content loaded on page load -->
    <div class="js-ajax" data-ajax-url="/cms/comments/ajaxList?doc_id={{detail.id}}" id="cms_comments_container">
        <!-- ajax content -->
    </div>
    <!-- /LIST COMMENTS -->



</div>